<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use App\Models\AdminRole;

class CommonController extends Controller
{

    public function getAdminRoles()
    {
        return AdminRole::query()
                        ->get()
                        ->makeHidden(['created_at', 'updated_at']);
    }

    public function season()
    {
        $season = range(1, env('KILL_SEASON'));

        $options = [];

        foreach ($season as $item) {
            $select = [];
            $select['key'] = $item;
            $select['label'] = 'S' . $item . '赛季';
            $options[] = $select;
        }

        return $options;
    }
}
